<template>
    <view class="bg-[#F8F8F8] pt-[20rpx] min-h-screen">
        <view class="text-[36rpx] mb-2 flex justify-around">
            <text @click="creent = 0"
                :class="creent == 0 ? 'font-bold text-[#FD755D] border-b-[5rpx] border-[#FD755D]' : ''"
                class="mr-[36rpx] ">学校</text>
            <text @click="creent = 1"
                :class="creent == 1 ? 'font-bold text-[#FD755D] border-b-[5rpx] border-[#FD755D]' : ''"
                class="text-[#434141]">课程</text>
            <text @click="creent = 2"
                :class="creent == 2 ? 'font-bold text-[#FD755D] border-b-[5rpx] border-[#FD755D]' : ''"
                class="text-[#434141]">文章</text>

        </view>
        <view class="mx-[20rpx] my-3">
            <u-search disabled bgColor="#fff" :showAction="false" placeholder="搜索" v-model="course"></u-search>
        </view>

        <view v-if="creent == 0">
            <view @click="navigateTo('/pages/schoolDetails/schoolDetails')" class="bg-[#fff] pb-[45rpx] mt-2">

                <view class="flex ml-[30rpx] mr-[20rpx] justify-between">
                    <view class="flex items-center">
                        <view class="w-[124rpx] h-[124rpx] relative">
                            <image class="w-[124rpx] h-[124rpx]"
                                src="https://gangantao.com/image/20241216/1ee10869-16bf-4e3a-b607-4aad213c4534.png">
                            </image>
                            <view
                                class=" absolute w-[124rpx]  text-center text-[#fff] bg-[#FD755D] bottom-0 text-[24rpx] rounded">
                                官方授权</view>
                        </view>
                        <view class="ml-[38rpx]">
                            <view class="text-[#3D3D3D] font-medium">
                                青秀区老年大学
                            </view>
                            <view class=" font-normal mt-[17rpx] text-[#FD755D]">
                                招生报名中>>
                            </view>
                        </view>
                    </view>


                </view>
            </view>
            <view class="bg-[#fff] pb-[45rpx] mt-[10rpx]">
                <view class="h-[36rpx]"></view>
                <view class="flex ml-[30rpx] mr-[20rpx] justify-between">
                    <view class="flex items-center">
                        <view class="w-[124rpx] h-[124rpx] relative">
                            <image class="w-[124rpx] h-[124rpx]"
                                src="https://gangantao.com/image/20241216/1ee10869-16bf-4e3a-b607-4aad213c4534.png">
                            </image>
                            <view
                                class=" absolute w-[124rpx]  text-center text-[#fff] bg-[#FD755D] bottom-0 text-[24rpx] rounded">
                                官方授权</view>
                        </view>
                        <view class="ml-[38rpx]">
                            <view class="text-[#3D3D3D] font-medium">
                                西乡塘老年大学
                            </view>
                            <view class=" font-normal mt-[17rpx] text-[#FD755D]">
                                招生报名中>>
                            </view>
                        </view>
                    </view>


                </view>
            </view>
            <view class="bg-[#fff] pb-[45rpx] mt-[10rpx]">
                <view class="h-[36rpx]"></view>
                <view class="flex ml-[30rpx] mr-[20rpx] justify-between">
                    <view class="flex items-center">
                        <view class="w-[124rpx] h-[124rpx] relative">
                            <image class="w-[124rpx] h-[124rpx]"
                                src="https://gangantao.com/image/20241216/1ee10869-16bf-4e3a-b607-4aad213c4534.png">
                            </image>
                            <view
                                class=" absolute w-[124rpx]  text-center text-[#fff] bg-[#FD755D] bottom-0 text-[24rpx] rounded">
                                官方授权</view>
                        </view>
                        <view class="ml-[38rpx]">
                            <view class="text-[#3D3D3D] font-medium">
                                马山县老年大学
                            </view>
                            <view class=" font-normal mt-[17rpx] text-[#FD755D]">
                                招生报名中>>
                            </view>
                        </view>
                    </view>


                </view>
            </view>
        </view>
        <view v-if="creent == 1">
            <view v-for="(item, index) in 3" :key="index" @click="navigateTo('/pages/eventDetails/eventDetails')"
                class="mt-[16rpx] shadow ml-[12rpx] mr-[18rpx] bg-white pl-[30rpx] pr-[10rpx] pt-[20rpx]">
                <view class="text-[#3D3D3D]  mb-[12rpx] flex justify-between items-end"><text
                        class="text-[32rpx]">风祥小区教学点</text><text class="text-[28rpx] ">3.8km</text>
                </view>
                <view class="flex pb-[26rpx]">
                    <image class="w-[200rpx] h-[200rpx]"
                        src="https://gangantao.com/image/20241216/da0e780c-e279-4d0e-be12-9ab9486ffaf7.png"></image>
                    <view class="ml-[16rpx] flex-1 flex flex-col justify-between h-[200rpx]">
                        <view class="flex items-start justify-between w-full">
                            <view class="flex items-start">
                                <view
                                    class=" text-white text-[28rpx] bg-[#FD755D] rounded px-1  mr-[12rpx] tracking-wider">
                                    一级学院</view>
                                <view class=" text-white text-[28rpx] bg-[#FD755D] rounded px-1">二级学院</view>
                            </view>
                            <view class="text-[#FF0000] text-[44rpx]">68元</view>
                        </view>
                        <view class="text-[32rpx] text-[#3D3D3D]">楷书毛笔字课程</view>
                        <view class="text-[28rpx] text-[#3D3D3D] ">2024.10.10</view>
                        <view class="flex items-end justify-between">
                            <view class="flex">
                                <view class=" text-white text-[28rpx] bg-[#FFA812] rounded px-1 mr-[12rpx]">学分兑换</view>
                                <view class=" text-white text-[28rpx] bg-[#FFA812] rounded px-1 mr-[12rpx]">社区</view>
                                <view class=" text-white text-[28rpx] bg-[#FFA812] rounded px-1">艺术</view>
                            </view>

                            <view class=" text-white py-[10rpx] px-4 bg-[#FD755D] rounded  text-[32rpx]">预约</view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <view v-if="creent == 2">
            <view @click="navigateTo('/pages/enrollmentInformationDetails/enrollmentInformationDetails?type=2')"
                v-for="(item, index) in 3" :key="index" class="px-[20rpx] mt-[10rpx] bg-white flex">
                <image
                    src="https://www.aqvtc.edu.cn/_upload/article/images/75/c2/589547794559a79e48ba9ab6fdfa/469aac11-9132-4451-a77a-019a3324ba9c_d.jpg"
                    class=" w-[190rpx] h-[190rpx]"></image>
                <view class="pl-[24rpx] pr-[40rpx] flex-1 flex flex-col justify-center">
                    <view class="text-[#3D3D3D] text-[38rpx] font-medium">新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题</view>
                    <view class="flex items-center text-[26rpx] justify-between mt-[20rpx]">
                        <text class=" font-medium text-[#979797] ">2024-12-22 12:34</text>
                        <view class="text-[#979797] flex items-center">
                            <view class="flex justify-center items-center mr-[16rpx]"> <u-icon name="thumb-up"
                                    color="#979797" size="19"></u-icon><text>1234</text></view>
                            <view class="flex justify-center items-center"> <u-icon name="eye" color="#979797"
                                    size="19"></u-icon><text>1234</text></view>


                        </view>
                    </view>
                </view>
            </view>
        </view>
    </view>

</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance } from 'vue'

const creent = ref(0);
const course = ref("")
const navigateTo = (url) => {
    uni.navigateTo({
        url
    })
}
</script>
<style></style>